<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>QxOrm: qx::IxPersistable Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo_qxorm.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">QxOrm
   &#160;<span id="projectnumber">1.4.3</span>
   </div>
   <div id="projectbrief">C++ Object Relational Mapping library</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('classqx_1_1_ix_persistable.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">qx::IxPersistable Class Reference<div class="ingroups"><a class="el" href="group___qx_dao.html">QxDao : QxOrm library database communication used by persistence engine (ORM - Object Relational Mapping)</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="qx::IxPersistable" -->
<p><a class="el" href="classqx_1_1_ix_persistable.html" title="qx::IxPersistable : common interface (abstract class) for persistents classes using QX_PERSISTABLE_HP...">qx::IxPersistable</a> : common interface (abstract class) for persistents classes using <a class="el" href="_ix_persistable_8h.html#a311d8fc0e6c4fc1c42e43a54f2dc44da">QX_PERSISTABLE_HPP()</a> and <a class="el" href="_ix_persistable_8h.html#a8c17d818d8f1dbf25636a9d0ed2f96bd">QX_PERSISTABLE_CPP()</a> macros  
 <a href="classqx_1_1_ix_persistable.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_ix_persistable_8h_source.html">IxPersistable.h</a>&gt;</code></p>

<p><a href="classqx_1_1_ix_persistable-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#a3ddce6d10d4e6c853026d706c1032b12">IxPersistable</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#a24085555a9f46f722b042c496827c91c">~IxPersistable</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#a3ae692c6d5d1464b50110fff56157cca">qxCount</a> (const <a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;query=<a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a>(), QSqlDatabase *pDatabase=NULL)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the number of lines in the table (database) mapped to the current C++ class (registered into QxOrm context) and filtered by a user SQL query.  <a href="#a3ae692c6d5d1464b50110fff56157cca"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSqlError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#a5901d8aa71a69b074a4033664bf9a434">qxCount</a> (long &amp;lCount, const <a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;query=<a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a>(), QSqlDatabase *pDatabase=NULL)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the number of lines in the table (database) mapped to the current C++ class (registered into QxOrm context) and filtered by a user SQL query.  <a href="#a5901d8aa71a69b074a4033664bf9a434"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSqlError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#a876805a6095b64ef1f4b35d5376dba6a">qxFetchById</a> (const QVariant &amp;id=QVariant(), const QStringList &amp;columns=QStringList(), const QStringList &amp;relation=QStringList(), QSqlDatabase *pDatabase=NULL)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Fetch current instance (retrieve all its properties) mapped to a table in the database (current instance must have a valid id before to be fetched without error, or pass the id to the first parameter of this method)  <a href="#a876805a6095b64ef1f4b35d5376dba6a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSqlError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#a740c2181f4c42ab633a9fd36cc181a25">qxFetchAll</a> (<a class="el" href="classqx_1_1_ix_collection.html">qx::IxCollection</a> &amp;list, const QStringList &amp;columns=QStringList(), const QStringList &amp;relation=QStringList(), QSqlDatabase *pDatabase=NULL)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Fetch a list of objects (retrieve all elements and properties associated) of current type (container registered into QxOrm context) mapped to a table in the database.  <a href="#a740c2181f4c42ab633a9fd36cc181a25"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSqlError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#a73f21e52a5c2285feae6d496e6e789c7">qxFetchByQuery</a> (const <a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;query, <a class="el" href="classqx_1_1_ix_collection.html">qx::IxCollection</a> &amp;list, const QStringList &amp;columns=QStringList(), const QStringList &amp;relation=QStringList(), QSqlDatabase *pDatabase=NULL)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Fetch a list of objects (retrieve all elements and properties associated) of current type (container registered into QxOrm context) mapped to a table in the database and filtered by a user SQL query.  <a href="#a73f21e52a5c2285feae6d496e6e789c7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSqlError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#a70228ab48df9be4b741af346423e7b2a">qxInsert</a> (const QStringList &amp;relation=QStringList(), QSqlDatabase *pDatabase=NULL)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Insert current instance into database.  <a href="#a70228ab48df9be4b741af346423e7b2a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSqlError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#a7b9b84ea8bf98a82c06c1c5ca8d4790a">qxUpdate</a> (const <a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;query=<a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a>(), const QStringList &amp;columns=QStringList(), const QStringList &amp;relation=QStringList(), QSqlDatabase *pDatabase=NULL)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Update current instance into database (you can add a user SQL query to the default SQL query builded by QxOrm library)  <a href="#a7b9b84ea8bf98a82c06c1c5ca8d4790a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSqlError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#a3d1d85b74cfa3a83a4facca00520a3f8">qxSave</a> (const QStringList &amp;relation=QStringList(), QSqlDatabase *pDatabase=NULL)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Insert (if no exist) or update (if already exist) current instance into database.  <a href="#a3d1d85b74cfa3a83a4facca00520a3f8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSqlError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#a7bd431be248eb003e36329a326c3fb19">qxDeleteById</a> (const QVariant &amp;id=QVariant(), QSqlDatabase *pDatabase=NULL)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete current instance from database.  <a href="#a7bd431be248eb003e36329a326c3fb19"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSqlError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#ad7db92b5dcc9b7ea10743520bd7fa6aa">qxDeleteAll</a> (QSqlDatabase *pDatabase=NULL)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete all lines of a table (database) mapped to current C++ class (registered into QxOrm context)  <a href="#ad7db92b5dcc9b7ea10743520bd7fa6aa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSqlError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#a2208812267cec1882ffc10d5b1023f72">qxDeleteByQuery</a> (const <a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;query, QSqlDatabase *pDatabase=NULL)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete all lines of a table (database) mapped to current C++ class (registered into QxOrm context) and filtered by a user SQL query.  <a href="#a2208812267cec1882ffc10d5b1023f72"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSqlError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#affc359e17451f6a98b631f12d41aeab9">qxDestroyById</a> (const QVariant &amp;id=QVariant(), QSqlDatabase *pDatabase=NULL)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete current instance from database.  <a href="#affc359e17451f6a98b631f12d41aeab9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSqlError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#a10e638848ee413aba09d456b4716ccff">qxDestroyAll</a> (QSqlDatabase *pDatabase=NULL)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete all lines of a table (database) mapped to current C++ class (registered into QxOrm context)  <a href="#a10e638848ee413aba09d456b4716ccff"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSqlError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#a42e9465e9c339bde3a196120af16bdbc">qxDestroyByQuery</a> (const <a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;query, QSqlDatabase *pDatabase=NULL)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete all lines of a table (database) mapped to current C++ class (registered into QxOrm context) and filtered by a user SQL query.  <a href="#a42e9465e9c339bde3a196120af16bdbc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSqlError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#a37a020620fbdf407b0fd2e5b391ab53a">qxExecuteQuery</a> (<a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;query, QSqlDatabase *pDatabase=NULL)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Execute a custom SQL query or a stored procedure, all columns that can be mapped to the instance of type T will be fetched automatically.  <a href="#a37a020620fbdf407b0fd2e5b391ab53a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSqlError&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#a8de88eb29cf505f843f35b4db0636fba">qxExecuteQuery</a> (<a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;query, <a class="el" href="classqx_1_1_ix_collection.html">qx::IxCollection</a> &amp;list, QSqlDatabase *pDatabase=NULL)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Execute a custom SQL query or a stored procedure, all columns that can be mapped to the instance of type T will be fetched automatically.  <a href="#a8de88eb29cf505f843f35b4db0636fba"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="_qx_bool_8h.html#a40069a4245b458585997dadea3a86b33">qx_bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#ae47c7b90be8de1b9782efe154347c7a6">qxExist</a> (const QVariant &amp;id=QVariant(), QSqlDatabase *pDatabase=NULL)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Search if current instance already exists into database.  <a href="#ae47c7b90be8de1b9782efe154347c7a6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classqx_1_1_qx_invalid_value_x.html">qx::QxInvalidValueX</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#aff7650c2b97324a9cedd6ec5f6d8d7a3">qxValidate</a> (const QStringList &amp;groups=QStringList())=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if current instance is valid or not.  <a href="#aff7650c2b97324a9cedd6ec5f6d8d7a3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceqx.html#a8792a6513f37c4a4ba24a55dbabee03b">qx::IxCollection_ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#a9e06a9fa15db0989e8771110b6e8492a">qxNewPersistableCollection</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new collection smart-pointer to fetch a list of items of current class type.  <a href="#a9e06a9fa15db0989e8771110b6e8492a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classqx_1_1_ix_class.html">qx::IxClass</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#abef7c3a8c5c974e416266accfcee3994">qxClass</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Access to introspection engine (or reflection engine) of QxOrm library.  <a href="#abef7c3a8c5c974e416266accfcee3994"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespaceqx.html#a8792a6513f37c4a4ba24a55dbabee03b">qx::IxCollection_ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#af1952e55bfa996e5855e84799f575dd5">qxFetchAll</a> (const QString &amp;className, const QStringList &amp;columns=QStringList(), const QStringList &amp;relation=QStringList(), QSqlDatabase *pDatabase=NULL)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespaceqx.html#a8792a6513f37c4a4ba24a55dbabee03b">qx::IxCollection_ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#a3794758637e6bdea9da6e02afb937888">qxFetchByQuery</a> (const QString &amp;className, const <a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;query, const QStringList &amp;columns=QStringList(), const QStringList &amp;relation=QStringList(), QSqlDatabase *pDatabase=NULL)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespaceqx.html#a8792a6513f37c4a4ba24a55dbabee03b">qx::IxCollection_ptr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classqx_1_1_ix_persistable.html#ab329236df42c737f5929a44c0d559d6e">qxExecuteQuery</a> (const QString &amp;className, <a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;query, QSqlDatabase *pDatabase=NULL)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classqx_1_1_ix_persistable.html" title="qx::IxPersistable : common interface (abstract class) for persistents classes using QX_PERSISTABLE_HP...">qx::IxPersistable</a> : common interface (abstract class) for persistents classes using <a class="el" href="_ix_persistable_8h.html#a311d8fc0e6c4fc1c42e43a54f2dc44da">QX_PERSISTABLE_HPP()</a> and <a class="el" href="_ix_persistable_8h.html#a8c17d818d8f1dbf25636a9d0ed2f96bd">QX_PERSISTABLE_CPP()</a> macros </p>
<p>To use this common interface for persistents classes : <br/>
 <b>1-</b> inherit your persistent class from <em><a class="el" href="classqx_1_1_ix_persistable.html" title="qx::IxPersistable : common interface (abstract class) for persistents classes using QX_PERSISTABLE_HP...">qx::IxPersistable</a></em> ; <br/>
 <b>2-</b> into your class definition (<em>myClass.h</em> for example), add <em><a class="el" href="_ix_persistable_8h.html#a311d8fc0e6c4fc1c42e43a54f2dc44da">QX_PERSISTABLE_HPP(myClass)</a></em> macro ; <br/>
 <b>3-</b> into your class implementation (<em>myClass.cpp</em> for example), add <em><a class="el" href="_ix_persistable_8h.html#a8c17d818d8f1dbf25636a9d0ed2f96bd">QX_PERSISTABLE_CPP(myClass)</a></em> macro.</p>
<p><b>Note :</b> for a list of objects (<em><a class="el" href="classqx_1_1_ix_persistable.html#a740c2181f4c42ab633a9fd36cc181a25" title="Fetch a list of objects (retrieve all elements and properties associated) of current type (container ...">qxFetchAll()</a></em> method or <em><a class="el" href="classqx_1_1_ix_persistable.html#a73f21e52a5c2285feae6d496e6e789c7" title="Fetch a list of objects (retrieve all elements and properties associated) of current type (container ...">qxFetchByQuery()</a></em> method), use <em><a class="el" href="classqx_1_1_qx_collection.html" title="qx::QxCollection&lt;Key, Value&gt; : QxOrm container (keep insertion order + quick access by index + quick ...">qx::QxCollection</a>&lt;type_primary_key, qx_shared_ptr&lt;my_type&gt;&gt;</em> type. Or just use <em><a class="el" href="classqx_1_1_ix_persistable_collection.html#a1d18f71fc2f7ef6587b246033e3322b5">qx::IxPersistableCollection&lt;T&gt;::type</a></em> to retrieve your persistent collection type. A convenient way to fetch a list of objects is to use following static methods <em><a class="el" href="classqx_1_1_ix_persistable.html#a740c2181f4c42ab633a9fd36cc181a25" title="Fetch a list of objects (retrieve all elements and properties associated) of current type (container ...">qxFetchAll()</a></em> and <em><a class="el" href="classqx_1_1_ix_persistable.html#a73f21e52a5c2285feae6d496e6e789c7" title="Fetch a list of objects (retrieve all elements and properties associated) of current type (container ...">qxFetchByQuery()</a></em> : </p>
<div class="fragment"><pre class="fragment"><a class="code" href="namespaceqx.html#a8792a6513f37c4a4ba24a55dbabee03b">qx::IxCollection_ptr</a> lst = <a class="code" href="classqx_1_1_ix_persistable.html#a740c2181f4c42ab633a9fd36cc181a25" title="Fetch a list of objects (retrieve all elements and properties associated) of current type (container ...">qx::IxPersistable::qxFetchAll</a>(<span class="stringliteral">&quot;myClass&quot;</span>);
<span class="keywordflow">for</span> (<span class="keywordtype">long</span> l = 0; l &lt; lst-&gt;_count(); l++)
{ <a class="code" href="namespaceqx.html#ac6a83a2493567738599e729098d0e1d5">qx::IxPersistable_ptr</a> ptr = lst-&gt;_get&lt;<a class="code" href="namespaceqx.html#ac6a83a2493567738599e729098d0e1d5">qx::IxPersistable_ptr</a>&gt;(l); etc... }
</pre></div> 
<p>Definition at line <a class="el" href="_ix_persistable_8h_source.html#l00080">80</a> of file <a class="el" href="_ix_persistable_8h_source.html">IxPersistable.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a3ddce6d10d4e6c853026d706c1032b12"></a><!-- doxytag: member="qx::IxPersistable::IxPersistable" ref="a3ddce6d10d4e6c853026d706c1032b12" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">qx::IxPersistable::IxPersistable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a24085555a9f46f722b042c496827c91c"></a><!-- doxytag: member="qx::IxPersistable::~IxPersistable" ref="a24085555a9f46f722b042c496827c91c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual qx::IxPersistable::~IxPersistable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="abef7c3a8c5c974e416266accfcee3994"></a><!-- doxytag: member="qx::IxPersistable::qxClass" ref="abef7c3a8c5c974e416266accfcee3994" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classqx_1_1_ix_class.html">qx::IxClass</a>* qx::IxPersistable::qxClass </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Access to introspection engine (or reflection engine) of QxOrm library. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Return a <a class="el" href="classqx_1_1_ix_class.html" title="qx::IxClass : common interface for all classes registered into QxOrm context">qx::IxClass</a> pointer to access to introspection engine (or reflection engine) of QxOrm library, and get some informations about current class (properties, methods, etc...) </dd></dl>

</div>
</div>
<a class="anchor" id="a3ae692c6d5d1464b50110fff56157cca"></a><!-- doxytag: member="qx::IxPersistable::qxCount" ref="a3ae692c6d5d1464b50110fff56157cca" args="(const qx::QxSqlQuery &amp;query=qx::QxSqlQuery(), QSqlDatabase *pDatabase=NULL)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual long qx::IxPersistable::qxCount </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;&#160;</td>
          <td class="paramname"><em>query</em> = <code><a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return the number of lines in the table (database) mapped to the current C++ class (registered into QxOrm context) and filtered by a user SQL query. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">query</td><td>Define a user SQL query added to default SQL query builded by QxOrm library </td></tr>
    <tr><td class="paramname">pDatabase</td><td>Connection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by <a class="el" href="classqx_1_1_qx_sql_database.html" title="qx::QxSqlDatabase : define all parameters to connect to database and retrieve a valid connection by t...">qx::QxSqlDatabase</a> singleton class</td></tr>
  </table>
  </dd>
</dl>
<p><a class="el" href="classqx_1_1_ix_persistable.html" title="qx::IxPersistable : common interface (abstract class) for persistents classes using QX_PERSISTABLE_HP...">qx::IxPersistable</a> * p = ...;<br/>
 p-&gt;qxCount(...) execute following SQL query :<br/>
 <em>SELECT COUNT(*) FROM my_table</em> + <em>WHERE my_query...</em> </p>

</div>
</div>
<a class="anchor" id="a5901d8aa71a69b074a4033664bf9a434"></a><!-- doxytag: member="qx::IxPersistable::qxCount" ref="a5901d8aa71a69b074a4033664bf9a434" args="(long &amp;lCount, const qx::QxSqlQuery &amp;query=qx::QxSqlQuery(), QSqlDatabase *pDatabase=NULL)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual QSqlError qx::IxPersistable::qxCount </td>
          <td>(</td>
          <td class="paramtype">long &amp;&#160;</td>
          <td class="paramname"><em>lCount</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;&#160;</td>
          <td class="paramname"><em>query</em> = <code><a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return the number of lines in the table (database) mapped to the current C++ class (registered into QxOrm context) and filtered by a user SQL query. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">lCount</td><td>Output parameter with the number of lines in the table associated to the SQL query </td></tr>
    <tr><td class="paramname">query</td><td>Define a user SQL query added to default SQL query builded by QxOrm library </td></tr>
    <tr><td class="paramname">pDatabase</td><td>Connection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by <a class="el" href="classqx_1_1_qx_sql_database.html" title="qx::QxSqlDatabase : define all parameters to connect to database and retrieve a valid connection by t...">qx::QxSqlDatabase</a> singleton class</td></tr>
  </table>
  </dd>
</dl>
<p><a class="el" href="classqx_1_1_ix_persistable.html" title="qx::IxPersistable : common interface (abstract class) for persistents classes using QX_PERSISTABLE_HP...">qx::IxPersistable</a> * p = ...;<br/>
 p-&gt;qxCount(...) execute following SQL query :<br/>
 <em>SELECT COUNT(*) FROM my_table</em> + <em>WHERE my_query...</em> </p>

</div>
</div>
<a class="anchor" id="ad7db92b5dcc9b7ea10743520bd7fa6aa"></a><!-- doxytag: member="qx::IxPersistable::qxDeleteAll" ref="ad7db92b5dcc9b7ea10743520bd7fa6aa" args="(QSqlDatabase *pDatabase=NULL)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual QSqlError qx::IxPersistable::qxDeleteAll </td>
          <td>(</td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Delete all lines of a table (database) mapped to current C++ class (registered into QxOrm context) </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pDatabase</td><td>Connection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by <a class="el" href="classqx_1_1_qx_sql_database.html" title="qx::QxSqlDatabase : define all parameters to connect to database and retrieve a valid connection by t...">qx::QxSqlDatabase</a> singleton class </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query</dd></dl>
<p><a class="el" href="classqx_1_1_ix_persistable.html" title="qx::IxPersistable : common interface (abstract class) for persistents classes using QX_PERSISTABLE_HP...">qx::IxPersistable</a> * p = ...;<br/>
 p-&gt;qxDeleteAll(...) execute following SQL query :<br/>
 <em>DELETE FROM my_table</em><br/>
 <br/>
 If a soft delete behavior is defined for current class, p-&gt;qxDeleteAll(...) execute following SQL query :<br/>
 <em>UPDATE my_table SET is_deleted='1'</em> </p>

</div>
</div>
<a class="anchor" id="a7bd431be248eb003e36329a326c3fb19"></a><!-- doxytag: member="qx::IxPersistable::qxDeleteById" ref="a7bd431be248eb003e36329a326c3fb19" args="(const QVariant &amp;id=QVariant(), QSqlDatabase *pDatabase=NULL)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual QSqlError qx::IxPersistable::qxDeleteById </td>
          <td>(</td>
          <td class="paramtype">const QVariant &amp;&#160;</td>
          <td class="paramname"><em>id</em> = <code>QVariant()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Delete current instance from database. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">id</td><td>Unique id to delete from database (if empty, check id of current instance) </td></tr>
    <tr><td class="paramname">pDatabase</td><td>Connection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by <a class="el" href="classqx_1_1_qx_sql_database.html" title="qx::QxSqlDatabase : define all parameters to connect to database and retrieve a valid connection by t...">qx::QxSqlDatabase</a> singleton class </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query</dd></dl>
<p><a class="el" href="classqx_1_1_ix_persistable.html" title="qx::IxPersistable : common interface (abstract class) for persistents classes using QX_PERSISTABLE_HP...">qx::IxPersistable</a> * p = ...;<br/>
 p-&gt;qxDeleteById(...) execute following SQL query :<br/>
 <em>DELETE FROM my_table WHERE my_id = ?</em><br/>
 <br/>
 If a soft delete behavior is defined for current class, p-&gt;qxDeleteById(...) execute following SQL query :<br/>
 <em>UPDATE my_table SET is_deleted='1' WHERE my_id = ?</em> </p>

</div>
</div>
<a class="anchor" id="a2208812267cec1882ffc10d5b1023f72"></a><!-- doxytag: member="qx::IxPersistable::qxDeleteByQuery" ref="a2208812267cec1882ffc10d5b1023f72" args="(const qx::QxSqlQuery &amp;query, QSqlDatabase *pDatabase=NULL)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual QSqlError qx::IxPersistable::qxDeleteByQuery </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;&#160;</td>
          <td class="paramname"><em>query</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Delete all lines of a table (database) mapped to current C++ class (registered into QxOrm context) and filtered by a user SQL query. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">query</td><td>Define a user SQL query added to default SQL query builded by QxOrm library </td></tr>
    <tr><td class="paramname">pDatabase</td><td>Connection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by <a class="el" href="classqx_1_1_qx_sql_database.html" title="qx::QxSqlDatabase : define all parameters to connect to database and retrieve a valid connection by t...">qx::QxSqlDatabase</a> singleton class </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query</dd></dl>
<p><a class="el" href="classqx_1_1_ix_persistable.html" title="qx::IxPersistable : common interface (abstract class) for persistents classes using QX_PERSISTABLE_HP...">qx::IxPersistable</a> * p = ...;<br/>
 p-&gt;qxDeleteByQuery(...) execute following SQL query :<br/>
 <em>DELETE FROM my_table</em> + <em>WHERE my_query...</em><br/>
 <br/>
 If a soft delete behavior is defined for current class, p-&gt;qxDeleteByQuery(...) execute following SQL query :<br/>
 <em>UPDATE my_table SET is_deleted='1'</em> + <em>WHERE my_query...</em> </p>

</div>
</div>
<a class="anchor" id="a10e638848ee413aba09d456b4716ccff"></a><!-- doxytag: member="qx::IxPersistable::qxDestroyAll" ref="a10e638848ee413aba09d456b4716ccff" args="(QSqlDatabase *pDatabase=NULL)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual QSqlError qx::IxPersistable::qxDestroyAll </td>
          <td>(</td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Delete all lines of a table (database) mapped to current C++ class (registered into QxOrm context) </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pDatabase</td><td>Connection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by <a class="el" href="classqx_1_1_qx_sql_database.html" title="qx::QxSqlDatabase : define all parameters to connect to database and retrieve a valid connection by t...">qx::QxSqlDatabase</a> singleton class </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query</dd></dl>
<p><a class="el" href="classqx_1_1_ix_persistable.html" title="qx::IxPersistable : common interface (abstract class) for persistents classes using QX_PERSISTABLE_HP...">qx::IxPersistable</a> * p = ...;<br/>
 p-&gt;qxDestroyAll(...) execute following SQL query :<br/>
 <em>DELETE FROM my_table</em><br/>
 </p>

</div>
</div>
<a class="anchor" id="affc359e17451f6a98b631f12d41aeab9"></a><!-- doxytag: member="qx::IxPersistable::qxDestroyById" ref="affc359e17451f6a98b631f12d41aeab9" args="(const QVariant &amp;id=QVariant(), QSqlDatabase *pDatabase=NULL)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual QSqlError qx::IxPersistable::qxDestroyById </td>
          <td>(</td>
          <td class="paramtype">const QVariant &amp;&#160;</td>
          <td class="paramname"><em>id</em> = <code>QVariant()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Delete current instance from database. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">id</td><td>Unique id to delete from database (if empty, check id of current instance) </td></tr>
    <tr><td class="paramname">pDatabase</td><td>Connection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by <a class="el" href="classqx_1_1_qx_sql_database.html" title="qx::QxSqlDatabase : define all parameters to connect to database and retrieve a valid connection by t...">qx::QxSqlDatabase</a> singleton class </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query</dd></dl>
<p><a class="el" href="classqx_1_1_ix_persistable.html" title="qx::IxPersistable : common interface (abstract class) for persistents classes using QX_PERSISTABLE_HP...">qx::IxPersistable</a> * p = ...;<br/>
 p-&gt;qxDestroyById(...) execute following SQL query :<br/>
 <em>DELETE FROM my_table WHERE my_id = ?</em><br/>
 </p>

</div>
</div>
<a class="anchor" id="a42e9465e9c339bde3a196120af16bdbc"></a><!-- doxytag: member="qx::IxPersistable::qxDestroyByQuery" ref="a42e9465e9c339bde3a196120af16bdbc" args="(const qx::QxSqlQuery &amp;query, QSqlDatabase *pDatabase=NULL)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual QSqlError qx::IxPersistable::qxDestroyByQuery </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;&#160;</td>
          <td class="paramname"><em>query</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Delete all lines of a table (database) mapped to current C++ class (registered into QxOrm context) and filtered by a user SQL query. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">query</td><td>Define a user SQL query added to default SQL query builded by QxOrm library </td></tr>
    <tr><td class="paramname">pDatabase</td><td>Connection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by <a class="el" href="classqx_1_1_qx_sql_database.html" title="qx::QxSqlDatabase : define all parameters to connect to database and retrieve a valid connection by t...">qx::QxSqlDatabase</a> singleton class </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query</dd></dl>
<p><a class="el" href="classqx_1_1_ix_persistable.html" title="qx::IxPersistable : common interface (abstract class) for persistents classes using QX_PERSISTABLE_HP...">qx::IxPersistable</a> * p = ...;<br/>
 p-&gt;qxDestroyByQuery(...) execute following SQL query :<br/>
 <em>DELETE FROM my_table</em> + <em>WHERE my_query...</em><br/>
 </p>

</div>
</div>
<a class="anchor" id="a37a020620fbdf407b0fd2e5b391ab53a"></a><!-- doxytag: member="qx::IxPersistable::qxExecuteQuery" ref="a37a020620fbdf407b0fd2e5b391ab53a" args="(qx::QxSqlQuery &amp;query, QSqlDatabase *pDatabase=NULL)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual QSqlError qx::IxPersistable::qxExecuteQuery </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;&#160;</td>
          <td class="paramname"><em>query</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Execute a custom SQL query or a stored procedure, all columns that can be mapped to the instance of type T will be fetched automatically. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">query</td><td>Define a user SQL query added to default SQL query builded by QxOrm library </td></tr>
    <tr><td class="paramname">pDatabase</td><td>Connection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by <a class="el" href="classqx_1_1_qx_sql_database.html" title="qx::QxSqlDatabase : define all parameters to connect to database and retrieve a valid connection by t...">qx::QxSqlDatabase</a> singleton class </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query </dd></dl>

</div>
</div>
<a class="anchor" id="a8de88eb29cf505f843f35b4db0636fba"></a><!-- doxytag: member="qx::IxPersistable::qxExecuteQuery" ref="a8de88eb29cf505f843f35b4db0636fba" args="(qx::QxSqlQuery &amp;query, qx::IxCollection &amp;list, QSqlDatabase *pDatabase=NULL)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual QSqlError qx::IxPersistable::qxExecuteQuery </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;&#160;</td>
          <td class="paramname"><em>query</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classqx_1_1_ix_collection.html">qx::IxCollection</a> &amp;&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Execute a custom SQL query or a stored procedure, all columns that can be mapped to the instance of type T will be fetched automatically. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">query</td><td>Define a user SQL query added to default SQL query builded by QxOrm library </td></tr>
    <tr><td class="paramname">list</td><td>Container to fetch all items (retrieve all elements and properties associated); list is cleared before executing SQL query </td></tr>
    <tr><td class="paramname">pDatabase</td><td>Connection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by <a class="el" href="classqx_1_1_qx_sql_database.html" title="qx::QxSqlDatabase : define all parameters to connect to database and retrieve a valid connection by t...">qx::QxSqlDatabase</a> singleton class </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query </dd></dl>

</div>
</div>
<a class="anchor" id="ab329236df42c737f5929a44c0d559d6e"></a><!-- doxytag: member="qx::IxPersistable::qxExecuteQuery" ref="ab329236df42c737f5929a44c0d559d6e" args="(const QString &amp;className, qx::QxSqlQuery &amp;query, QSqlDatabase *pDatabase=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespaceqx.html#a8792a6513f37c4a4ba24a55dbabee03b">qx::IxCollection_ptr</a> qx::IxPersistable::qxExecuteQuery </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>className</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;&#160;</td>
          <td class="paramname"><em>query</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ae47c7b90be8de1b9782efe154347c7a6"></a><!-- doxytag: member="qx::IxPersistable::qxExist" ref="ae47c7b90be8de1b9782efe154347c7a6" args="(const QVariant &amp;id=QVariant(), QSqlDatabase *pDatabase=NULL)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="_qx_bool_8h.html#a40069a4245b458585997dadea3a86b33">qx_bool</a> qx::IxPersistable::qxExist </td>
          <td>(</td>
          <td class="paramtype">const QVariant &amp;&#160;</td>
          <td class="paramname"><em>id</em> = <code>QVariant()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Search if current instance already exists into database. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">id</td><td>Unique id to check into database (if empty, check id of current instance) </td></tr>
    <tr><td class="paramname">pDatabase</td><td>Connection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by <a class="el" href="classqx_1_1_qx_sql_database.html" title="qx::QxSqlDatabase : define all parameters to connect to database and retrieve a valid connection by t...">qx::QxSqlDatabase</a> singleton class </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Return true if element already exists into database; otherwise return false; if an error occurred, qx_bool object contains a description of database error executing SQL query</dd></dl>
<p><a class="el" href="classqx_1_1_ix_persistable.html" title="qx::IxPersistable : common interface (abstract class) for persistents classes using QX_PERSISTABLE_HP...">qx::IxPersistable</a> * p = ...;<br/>
 p-&gt;qxExist(...) execute following SQL query :<br/>
 <em>SELECT * FROM my_table WHERE my_id = ?</em> </p>

</div>
</div>
<a class="anchor" id="a740c2181f4c42ab633a9fd36cc181a25"></a><!-- doxytag: member="qx::IxPersistable::qxFetchAll" ref="a740c2181f4c42ab633a9fd36cc181a25" args="(qx::IxCollection &amp;list, const QStringList &amp;columns=QStringList(), const QStringList &amp;relation=QStringList(), QSqlDatabase *pDatabase=NULL)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual QSqlError qx::IxPersistable::qxFetchAll </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classqx_1_1_ix_collection.html">qx::IxCollection</a> &amp;&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QStringList &amp;&#160;</td>
          <td class="paramname"><em>columns</em> = <code>QStringList()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QStringList &amp;&#160;</td>
          <td class="paramname"><em>relation</em> = <code>QStringList()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Fetch a list of objects (retrieve all elements and properties associated) of current type (container registered into QxOrm context) mapped to a table in the database. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>Container to fetch all items (retrieve all elements and properties associated); list is cleared before executing SQL query </td></tr>
    <tr><td class="paramname">columns</td><td>List of database table columns (mapped to properties of C++ class) to fetch (if empty, all columns are fetched) </td></tr>
    <tr><td class="paramname">relation</td><td>List of relationships keys to fetch (eager fetch instead of default lazy fetch for a relation) : use "|" separator to put many relationships keys into this parameter </td></tr>
    <tr><td class="paramname">pDatabase</td><td>Connection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by <a class="el" href="classqx_1_1_qx_sql_database.html" title="qx::QxSqlDatabase : define all parameters to connect to database and retrieve a valid connection by t...">qx::QxSqlDatabase</a> singleton class </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query</dd></dl>
<p><a class="el" href="classqx_1_1_ix_persistable.html" title="qx::IxPersistable : common interface (abstract class) for persistents classes using QX_PERSISTABLE_HP...">qx::IxPersistable</a> * p = ...;<br/>
 <a class="el" href="namespaceqx.html#a8792a6513f37c4a4ba24a55dbabee03b">qx::IxCollection_ptr</a> lst = p-&gt;<a class="el" href="classqx_1_1_ix_persistable.html#a9e06a9fa15db0989e8771110b6e8492a" title="Create a new collection smart-pointer to fetch a list of items of current class type.">qxNewPersistableCollection()</a>;<br/>
 p-&gt;qxFetchAll(&amp; lst, ...) execute following SQL query :<br/>
 <em>SELECT * FROM my_table</em> </p>

</div>
</div>
<a class="anchor" id="af1952e55bfa996e5855e84799f575dd5"></a><!-- doxytag: member="qx::IxPersistable::qxFetchAll" ref="af1952e55bfa996e5855e84799f575dd5" args="(const QString &amp;className, const QStringList &amp;columns=QStringList(), const QStringList &amp;relation=QStringList(), QSqlDatabase *pDatabase=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespaceqx.html#a8792a6513f37c4a4ba24a55dbabee03b">qx::IxCollection_ptr</a> qx::IxPersistable::qxFetchAll </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>className</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QStringList &amp;&#160;</td>
          <td class="paramname"><em>columns</em> = <code>QStringList()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QStringList &amp;&#160;</td>
          <td class="paramname"><em>relation</em> = <code>QStringList()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a876805a6095b64ef1f4b35d5376dba6a"></a><!-- doxytag: member="qx::IxPersistable::qxFetchById" ref="a876805a6095b64ef1f4b35d5376dba6a" args="(const QVariant &amp;id=QVariant(), const QStringList &amp;columns=QStringList(), const QStringList &amp;relation=QStringList(), QSqlDatabase *pDatabase=NULL)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual QSqlError qx::IxPersistable::qxFetchById </td>
          <td>(</td>
          <td class="paramtype">const QVariant &amp;&#160;</td>
          <td class="paramname"><em>id</em> = <code>QVariant()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QStringList &amp;&#160;</td>
          <td class="paramname"><em>columns</em> = <code>QStringList()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QStringList &amp;&#160;</td>
          <td class="paramname"><em>relation</em> = <code>QStringList()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Fetch current instance (retrieve all its properties) mapped to a table in the database (current instance must have a valid id before to be fetched without error, or pass the id to the first parameter of this method) </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">id</td><td>Unique id to fetch properties from database (if empty, check id of current instance) </td></tr>
    <tr><td class="paramname">columns</td><td>List of database table columns (mapped to properties of C++ class) to fetch (if empty, all columns are fetched) </td></tr>
    <tr><td class="paramname">relation</td><td>List of relationships keys to fetch (eager fetch instead of default lazy fetch for a relation) : use "|" separator to put many relationships keys into this parameter </td></tr>
    <tr><td class="paramname">pDatabase</td><td>Connection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by <a class="el" href="classqx_1_1_qx_sql_database.html" title="qx::QxSqlDatabase : define all parameters to connect to database and retrieve a valid connection by t...">qx::QxSqlDatabase</a> singleton class </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query</dd></dl>
<p><a class="el" href="classqx_1_1_ix_persistable.html" title="qx::IxPersistable : common interface (abstract class) for persistents classes using QX_PERSISTABLE_HP...">qx::IxPersistable</a> * p = ...;<br/>
 p-&gt;qxFetchById(...) execute following SQL query :<br/>
 <em>SELECT * FROM my_table WHERE my_id = ?</em> </p>

</div>
</div>
<a class="anchor" id="a73f21e52a5c2285feae6d496e6e789c7"></a><!-- doxytag: member="qx::IxPersistable::qxFetchByQuery" ref="a73f21e52a5c2285feae6d496e6e789c7" args="(const qx::QxSqlQuery &amp;query, qx::IxCollection &amp;list, const QStringList &amp;columns=QStringList(), const QStringList &amp;relation=QStringList(), QSqlDatabase *pDatabase=NULL)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual QSqlError qx::IxPersistable::qxFetchByQuery </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;&#160;</td>
          <td class="paramname"><em>query</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classqx_1_1_ix_collection.html">qx::IxCollection</a> &amp;&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QStringList &amp;&#160;</td>
          <td class="paramname"><em>columns</em> = <code>QStringList()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QStringList &amp;&#160;</td>
          <td class="paramname"><em>relation</em> = <code>QStringList()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Fetch a list of objects (retrieve all elements and properties associated) of current type (container registered into QxOrm context) mapped to a table in the database and filtered by a user SQL query. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">query</td><td>Define a user SQL query added to default SQL query builded by QxOrm library </td></tr>
    <tr><td class="paramname">list</td><td>Container to fetch all items (retrieve all elements and properties associated); list is cleared before executing SQL query </td></tr>
    <tr><td class="paramname">columns</td><td>List of database table columns (mapped to properties of C++ class) to fetch (if empty, all columns are fetched) </td></tr>
    <tr><td class="paramname">relation</td><td>List of relationships keys to fetch (eager fetch instead of default lazy fetch for a relation) : use "|" separator to put many relationships keys into this parameter </td></tr>
    <tr><td class="paramname">pDatabase</td><td>Connection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by <a class="el" href="classqx_1_1_qx_sql_database.html" title="qx::QxSqlDatabase : define all parameters to connect to database and retrieve a valid connection by t...">qx::QxSqlDatabase</a> singleton class </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query</dd></dl>
<p><a class="el" href="classqx_1_1_ix_persistable.html" title="qx::IxPersistable : common interface (abstract class) for persistents classes using QX_PERSISTABLE_HP...">qx::IxPersistable</a> * p = ...;<br/>
 <a class="el" href="namespaceqx.html#a8792a6513f37c4a4ba24a55dbabee03b">qx::IxCollection_ptr</a> lst = p-&gt;<a class="el" href="classqx_1_1_ix_persistable.html#a9e06a9fa15db0989e8771110b6e8492a" title="Create a new collection smart-pointer to fetch a list of items of current class type.">qxNewPersistableCollection()</a>;<br/>
 p-&gt;qxFetchByQuery(my_query, &amp; lst, ...) execute following SQL query :<br/>
 <em>SELECT * FROM my_table</em> + <em>WHERE my_query...</em> </p>

</div>
</div>
<a class="anchor" id="a3794758637e6bdea9da6e02afb937888"></a><!-- doxytag: member="qx::IxPersistable::qxFetchByQuery" ref="a3794758637e6bdea9da6e02afb937888" args="(const QString &amp;className, const qx::QxSqlQuery &amp;query, const QStringList &amp;columns=QStringList(), const QStringList &amp;relation=QStringList(), QSqlDatabase *pDatabase=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespaceqx.html#a8792a6513f37c4a4ba24a55dbabee03b">qx::IxCollection_ptr</a> qx::IxPersistable::qxFetchByQuery </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>className</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;&#160;</td>
          <td class="paramname"><em>query</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QStringList &amp;&#160;</td>
          <td class="paramname"><em>columns</em> = <code>QStringList()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QStringList &amp;&#160;</td>
          <td class="paramname"><em>relation</em> = <code>QStringList()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a70228ab48df9be4b741af346423e7b2a"></a><!-- doxytag: member="qx::IxPersistable::qxInsert" ref="a70228ab48df9be4b741af346423e7b2a" args="(const QStringList &amp;relation=QStringList(), QSqlDatabase *pDatabase=NULL)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual QSqlError qx::IxPersistable::qxInsert </td>
          <td>(</td>
          <td class="paramtype">const QStringList &amp;&#160;</td>
          <td class="paramname"><em>relation</em> = <code>QStringList()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Insert current instance into database. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">relation</td><td>List of relationships keys to insert in others tables of database : use "|" separator to put many relationships keys into this parameter </td></tr>
    <tr><td class="paramname">pDatabase</td><td>Connection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by <a class="el" href="classqx_1_1_qx_sql_database.html" title="qx::QxSqlDatabase : define all parameters to connect to database and retrieve a valid connection by t...">qx::QxSqlDatabase</a> singleton class </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query</dd></dl>
<p><a class="el" href="classqx_1_1_ix_persistable.html" title="qx::IxPersistable : common interface (abstract class) for persistents classes using QX_PERSISTABLE_HP...">qx::IxPersistable</a> * p = ...;<br/>
 p-&gt;qxInsert(...) execute following SQL query :<br/>
 <em>INSERT INTO my_table (my_column_1, my_column_2, etc.) VALUES (?, ?, etc.)</em> </p>

</div>
</div>
<a class="anchor" id="a9e06a9fa15db0989e8771110b6e8492a"></a><!-- doxytag: member="qx::IxPersistable::qxNewPersistableCollection" ref="a9e06a9fa15db0989e8771110b6e8492a" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="namespaceqx.html#a8792a6513f37c4a4ba24a55dbabee03b">qx::IxCollection_ptr</a> qx::IxPersistable::qxNewPersistableCollection </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a new collection smart-pointer to fetch a list of items of current class type. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Return a new collection smart-pointer to fetch a list of items of current class type </dd></dl>

</div>
</div>
<a class="anchor" id="a3d1d85b74cfa3a83a4facca00520a3f8"></a><!-- doxytag: member="qx::IxPersistable::qxSave" ref="a3d1d85b74cfa3a83a4facca00520a3f8" args="(const QStringList &amp;relation=QStringList(), QSqlDatabase *pDatabase=NULL)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual QSqlError qx::IxPersistable::qxSave </td>
          <td>(</td>
          <td class="paramtype">const QStringList &amp;&#160;</td>
          <td class="paramname"><em>relation</em> = <code>QStringList()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Insert (if no exist) or update (if already exist) current instance into database. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">relation</td><td>List of relationships keys to insert or update in others tables of database : use "|" separator to put many relationships keys into this parameter </td></tr>
    <tr><td class="paramname">pDatabase</td><td>Connection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by <a class="el" href="classqx_1_1_qx_sql_database.html" title="qx::QxSqlDatabase : define all parameters to connect to database and retrieve a valid connection by t...">qx::QxSqlDatabase</a> singleton class </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query</dd></dl>
<p><a class="el" href="classqx_1_1_ix_persistable.html" title="qx::IxPersistable : common interface (abstract class) for persistents classes using QX_PERSISTABLE_HP...">qx::IxPersistable</a> * p = ...;<br/>
 p-&gt;qxSave(...) execute following SQL query :<br/>
 <em>INSERT INTO my_table (my_column_1, my_column_2, etc.) VALUES (?, ?, etc.)</em> <br/>
or (if already exist into database) :<br/>
 <em>UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.</em> </p>

</div>
</div>
<a class="anchor" id="a7b9b84ea8bf98a82c06c1c5ca8d4790a"></a><!-- doxytag: member="qx::IxPersistable::qxUpdate" ref="a7b9b84ea8bf98a82c06c1c5ca8d4790a" args="(const qx::QxSqlQuery &amp;query=qx::QxSqlQuery(), const QStringList &amp;columns=QStringList(), const QStringList &amp;relation=QStringList(), QSqlDatabase *pDatabase=NULL)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual QSqlError qx::IxPersistable::qxUpdate </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a> &amp;&#160;</td>
          <td class="paramname"><em>query</em> = <code><a class="el" href="classqx_1_1_qx_sql_query.html">qx::QxSqlQuery</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QStringList &amp;&#160;</td>
          <td class="paramname"><em>columns</em> = <code>QStringList()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QStringList &amp;&#160;</td>
          <td class="paramname"><em>relation</em> = <code>QStringList()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QSqlDatabase *&#160;</td>
          <td class="paramname"><em>pDatabase</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Update current instance into database (you can add a user SQL query to the default SQL query builded by QxOrm library) </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">query</td><td>Define a user SQL query added to default SQL query builded by QxOrm library </td></tr>
    <tr><td class="paramname">columns</td><td>List of database table columns (mapped to properties of C++ class) to update (if empty, all columns are updated) </td></tr>
    <tr><td class="paramname">relation</td><td>List of relationships keys to update in others tables of database : use "|" separator to put many relationships keys into this parameter </td></tr>
    <tr><td class="paramname">pDatabase</td><td>Connection to database (you can manage your own connection pool for example, you can also define a transaction, etc.); if NULL, a valid connection for the current thread is provided by <a class="el" href="classqx_1_1_qx_sql_database.html" title="qx::QxSqlDatabase : define all parameters to connect to database and retrieve a valid connection by t...">qx::QxSqlDatabase</a> singleton class </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Empty QSqlError object (from Qt library) if no error occurred; otherwise QSqlError contains a description of database error executing SQL query</dd></dl>
<p><a class="el" href="classqx_1_1_ix_persistable.html" title="qx::IxPersistable : common interface (abstract class) for persistents classes using QX_PERSISTABLE_HP...">qx::IxPersistable</a> * p = ...;<br/>
 p-&gt;qxUpdate(...) execute following SQL query :<br/>
 <em>UPDATE my_table SET my_column_1 = ?, my_column_2 = ?, etc.</em> + <em>WHERE my_query...</em> </p>

</div>
</div>
<a class="anchor" id="aff7650c2b97324a9cedd6ec5f6d8d7a3"></a><!-- doxytag: member="qx::IxPersistable::qxValidate" ref="aff7650c2b97324a9cedd6ec5f6d8d7a3" args="(const QStringList &amp;groups=QStringList())=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classqx_1_1_qx_invalid_value_x.html">qx::QxInvalidValueX</a> qx::IxPersistable::qxValidate </td>
          <td>(</td>
          <td class="paramtype">const QStringList &amp;&#160;</td>
          <td class="paramname"><em>groups</em> = <code>QStringList()</code></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check if current instance is valid or not. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">groups</td><td>List of groups to check (defined into <a class="el" href="classqx_1_1_qx_validator.html" title="qx::QxValidator&lt;Owner&gt; : concrete class for a custom validator">QxValidator</a> module for current class) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Return list of invalid values (if empty, current instance is valid)</dd></dl>
<p>For more details about <b><a class="el" href="classqx_1_1_qx_validator.html" title="qx::QxValidator&lt;Owner&gt; : concrete class for a custom validator">QxValidator</a></b> module : <a href="http://www.qxorm.com/qxorm_en/faq.html#faq_250">http://www.qxorm.com/qxorm_en/faq.html#faq_250</a> </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>C:/Dvlp/_Perso/QxOrm/include/QxDao/<a class="el" href="_ix_persistable_8h_source.html">IxPersistable.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceqx.html">qx</a>      </li>
      <li class="navelem"><a class="el" href="classqx_1_1_ix_persistable.html">IxPersistable</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">Generated on Sun Dec 11 2016 13:41:12 for QxOrm by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
